<div id="left_side">
	<div id="news_archives">
		<div class="header">
			<h1><?php echo $dataResults->news_subject;?></h1>
			<div class="post">
				วันที่ <?php echo date('d/m/Y',strtotime($dataResults->news_publish_date));?><span class="grayLight"> l </span><?php echo $dataResults->author_by;?><span class="grayLight"> l </span><?php echo number_format($dataResults->views);?> VIEWS
			</div>
			<?php echo $module_facebook_plugins_share;?>
		</div>
		<?php if($dataResults->news_type_id == $category['review']['id']): //Album Review?>
			<p>
			<center>
			<a href="<?php echo image_asset_url('../uploads/news/images/original/'.@$dataResults->image->news_file_name.'.'.@$dataResults->image->news_file_ext);?>" rel="gallery">
				<?php echo exec_image(array(
					'folder' => 'news',
					'dimension' => '450x450',
					'file_name' => @$dataResults->image->news_file_name.'.'.@$dataResults->image->news_file_ext,
					'alt' => ''.@$dataResults->news_subject.'',	
					'title' => ''.@$dataResults->news_subject.''	
					)
				);?>
			</a>
			</center>
			</p>		
		<?php else:?>
			<?php echo image_asset('../uploads/news/images/original/'.@$dataResults->image->news_file_name.'.'.@$dataResults->image->news_file_ext,'',array('width' => '660','title' => $dataResults->news_subject,'alt' => $dataResults->news_subject));?>
			<?php //echo exec_image(array(
				//'folder' => 'news',
				//'dimension' => '660x325',
				//'file_name' => @$dataResults->image->news_file_name.'.'.@$dataResults->image->news_file_ext,
				//'alt' => ''.@$dataResults->news_subject.'',	
				//'title' => ''.@$dataResults->news_subject.''	
				//)
			//);?>
		<?php endif;?>
		<div class="info">
			<?php echo $dataResults->news_detail;?>
		</div>
		<?php if(!empty($dataNewsRelateManual)):?>
		<div id="news_relate_manual">
			<h3>เนื้อหาที่เกี่ยวข้อง</h3>
			<ul>
				<?php foreach($dataNewsRelateManual as $key => $value):?>
				<?php if($key%4 == 0 && $key != 0) echo "</ul><ul>";?>
				<li>
					<a href="<?php echo $value->link;?>" target="_blank">
						<div class="image">
							<?php echo exec_image(array(
									'folder' => ''.$value->module.'',
									'dimension' => '120x120',
									'file_name' => @$value->file_name.'.'.@$value->file_ext,
									'alt' => ''.@$value->name.'',	
									'title' => ''.@$value->name.''	
								)
							);?>						
						</div>
						<?php if(!empty($value->watermark)):?>
							<div class="watermark"><?php echo image_asset('news/'.$value->watermark);?></div>
						<?php endif;?>
						<h2><?php echo $value->name;?></h2>
					</a>
				</li>
				<?php endforeach;?>
			</ul>
		</div>
		<?php endif;?>
		<div id="news_relate_auto">
			<?php 
				switch($dataResults->news_type_id):
					case $category['thai']['id']: //Thai
						$links = "<a href=\"".base_url()."thai\">หน้าหลัก".$category['thai']['title']." &gt;</a>";
					break;
					case $category['inter']['id']: //Inter
						$links = "<a href=\"".base_url()."inter\">หน้าหลัก".$category['inter']['title']." &gt;</a>";
					break;
					case $category['asian']['id']: //Asian
						$links = "<a href=\"".base_url()."asian\">หน้าหลัก".$category['asian']['title']." &gt;</a>";
					break;
					case $category['movie']['id']: //Movie
						$links = "<a href=\"".base_url()."movie\">หน้าหลัก".$category['movie']['title']." &gt;</a>";
					break;
					case $category['pr']['id']: //P.R.
						$links = "<a href=\"".base_url()."pr\">หน้าหลัก".$category['pr']['title']." &gt;</a>";
					break;
					case $category['article']['id']: //Article
						$links = "<a href=\"".base_url()."article\">หน้าหลัก".$category['article']['title']." &gt;</a>";
					break;
					case $category['review']['id']: //Album Review
						$links = "<a href=\"".base_url()."review\">หน้าหลัก".$category['review']['title']." &gt;</a>";
					break;
					case $category['taro']['id']: //Taro
						$links = "<a href=\"".base_url()."taro\">หน้าหลัก".$category['taro']['title']." &gt;</a>";
					break;										
				endswitch;
			?>
			<h3>ข่าวที่เกี่ยวข้อง <?php echo $links;?></h3>
			<ul>
				<?php foreach($dataNewsRelateAuto as $value):?>
				<li>
					<a href="<?php echo base_url().'archives/'.end(explode('_',$value->id)).'-'.seo_url($value->news_name_s);?>" target="_blank">
						<div class="image">
							<?php echo exec_image(array(
									'folder' => 'news',
									'dimension' => '200x120',
									'file_name' => @$value->news_image_name_s,
									'alt' => ''.@$value->news_name_s.'',	
									'title' => ''.@$value->news_name_s.''	
								)
							);?>						
						</div>
						<h2><?php echo $value->news_name_s;?></h2>
					</a>
					<div class="post">
						วันที่ <?php echo date('d/m/Y',strtotime($value->last_modified));?>
					</div>					
				</li>
				<?php endforeach;?>
			</ul>		
		</div>
		<div id="news_archive_comment">
			<h2>
				<span>
					แสดงความคิดเห็น
				</span>
			</h2>
			<!--Facebook Comment-->
			<?php echo $module_facebook_plugins_comment;?>
		</div>	
	</div>
</div>
<div id="right_side">
	<!--Module-->
	<?php
	if(!empty($module))
	foreach($module as $value):?>
	<?php echo $value;?>
	<?php endforeach;?>
</div>
<script type="text/javascript" language="javascript">
    (function($) {
        /*whatever jQuery stuff*/
        $(function(){
			//Colorbox
			$('a[rel="gallery"]').colorbox();
        });
    })(jQuery);
</script>